-- GENERATED SPELL FOR [Large Vile Slime] --


function spell0_12387(pUnit, Event) --@Arcane Bolt,n/a--
pUnit:FullCastSpellOnTarget(37361,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12387', 1000, 1)
end

function spell1_12387(pUnit, Event) --@Arcane Explosion,Self--
pUnit:FullCastSpellOnTarget(11975,pUnit)
pUnit:RegisterEvent('Sorts_12387', 1500, 1)
end

function spell2_12387(pUnit, Event) --@Crimson Fury,Self--
pUnit:FullCastSpellOnTarget(16843,pUnit)
pUnit:RegisterEvent('Sorts_12387', 4305, 1)
end

function Sorts_12387(pUnit, Event)
local choix_sorts_12387 = math.random(0, 2)
if choix_sorts_12387 == 0 then
pUnit:RegisterEvent('spell0_12387', 1, 1)
end
if choix_sorts_12387 == 1 then
pUnit:RegisterEvent('spell1_12387', 1, 1)
end
if choix_sorts_12387 == 2 then
pUnit:RegisterEvent('spell2_12387', 1, 1)
end
end

function mob12387_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12387', math.random(1500, 3000), 1)
end

function mob12387_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12387_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12387_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12387, 1, 'mob12387_Action')
RegisterUnitEvent(12387, 2, 'mob12387_Leave')
RegisterUnitEvent(12387, 3, 'mob12387_Kill')
RegisterUnitEvent(12387, 4, 'mob12387_Die')
